exports.setImageThumbnail = function(req,res){

    var path = require("path");

    //获取body参数
    var bodyParams = req.routeInfo.bodyParams;

    //获取要处理的文件名称
    var imageUrl = "th_" + path.basename(bodyParams.srcImageUrl);
    var thPath = './' + config.fileManager.baseDir + "/" + config.uploadImageConfig.imageParocessingDir + "/" + imageUrl;

    GM(bodyParams.srcImageUrl)
    .resize(bodyParams.size).write(thPath, function (err) {
        if (err){
            return RES.errorResponse(res,"缩略图生成失败");
        }

        RES.successResponse(res,config.server.ip + ":" + config.server.port + "/" + config.uploadImageConfig.imageParocessingDir + "/" + imageUrl);
              
    })

}